test code
library(sf)
library(tmap)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
## Reading layer `nc' from data source `/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/sf/shape/nc.shp' using driver `ESRI Shapefile'
## Simple feature collection with 100 features and 14 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
## Geodetic CRS: NAD27
merged <- do.call(rbind, rep(list(nc), 100))
tmap::tmap_mode("view") +
tm_shape(merged) +
tm_fill(col="NAME", lwd = 0.2)
## tmap mode set to interactive viewing
## Warning: Number of levels of the variable "NAME" is 100, which is larger than max.categories (which is 30), so levels are combined. Set
## tmap_options(max.categories = 100) in the layer function to show all levels.